<?php
namespace addons\paotui\library\GatewayWorker\Applications\Paotui\controller;


use GatewayWorker\Register;
use Workerman\Worker;

// 自动加载类
require_once __DIR__ . '/../../../vendor/autoload.php';

class Sregister
{
    public function __construct()
    {

        $config = get_addon_config('paotui');
        // register 必须是text协议
        $register = new Register('text://0.0.0.0:'.$config['register_port']);

        // 如果不是在根目录启动，则运行runAll方法
        if(!defined('GLOBAL_START'))
        {
            Worker::runAll();
        }
    }

}
